using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Rapier.Kodachi
{
    public partial class DownloadLatest : Form
    {
        public DownloadLatest()
        {
            InitializeComponent();

            lblThanks.Visible = false;
            linkDownload.Links.Add(0, linkDownload.Text.Length, "http://rapiersoftware.com/betaDownload471/kodachi.zip");
        }

        private void linkDownload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            lblThanks.Visible = true;
            lblBigMessage.Enabled = false;
            lblTitle.Enabled = false;
            bLater.Enabled = false;
            Application.DoEvents();

            System.Diagnostics.Process.Start(e.Link.LinkData.ToString());
            Close();   
        }

        private void bLater_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Please download the latest version of Kodachi at your earliest convenience.  The program will now shut down.");
            Close();
        }
    }
}